﻿
namespace NLite
{
    /// <summary>
    /// 
    /// </summary>
    public interface ICommand
    {
        /// <summary>
        /// 
        /// </summary>
        void Execute();
    }

    /// <summary>
    /// 
    /// </summary>
    public interface ICompositeCommand : ICommand
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="cmd"></param>
        void Add(ICommand cmd);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TContext"></typeparam>
    public interface ICommand<TContext>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ctx"></param>
        void Execute(TContext ctx);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TContext"></typeparam>
    /// <typeparam name="TReturnValue"></typeparam>
    public interface ICommand<TContext,TReturnValue>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ctx"></param>
        /// <returns></returns>
        TReturnValue Execute(TContext ctx);
    }
}
